import http from "@/utils/http2.js";

/**
 * 获取用户信息
 * @param {*} data
 * @returns
 */
async function getUserList(data) {
  let res = await http.post("auction-user/api/queryByPage", data);
  return res;
}
/**
 * 修改用户状态
 * @param {*} data
 * @returns
 */
async function updateStatus(data) {
  let res = await http.post("auction-user/api/updateStatus", data);
  return res;
}
/**
 * 删除用户
 * @param {*} data
 * @returns
 */
async function deleteUser(data) {
  let res = await http.delete("auction-user/api/deleteUser", data);
  return res;
}
/**
 *
 * @returns 获取用户角色
 */
async function getRole() {
  let res = await http.get("auction-user/api/getRoles");
  return res;
}
/**
 * 修改用户信息
 * @param {*} data
 * @returns
 */
async function updateUser(data) {
  let res = await http.put("auction-user/api/updateUser", data);
  return res;
}
/**
 * 添加用户
 * @param {*} data
 * @returns
 */
async function addUser(data) {
  let res = await http.post("auction-user/api/addUser", data);
  return res;
}
export { getUserList, updateStatus, deleteUser, getRole, updateUser, addUser };
